//image.js
import request from "@/util/http";

export const getimage = (imgPath) => {
  let url = `${request.defaults.baseURL}/images/${imgPath}`
  return url;
};

export const uploadImg = (file) => {
  let formData = new FormData();
  formData.append("file", file);
  return request({
    url: "/image/upload",
    method: "post",
    data: formData, 
  })
}